< previous page page_440 next page >

Page 440
Type.gifListing 11.26. Adding the left and bottom titles to the graph.
Private Sub AddTitles()
    '
    ' add left and bottom titles
    '
    If Trim(strLeftTitle) <> "" Then
        frmGraph.Graph1.LeftTitle = strLeftTitle
    End If
    '
    If Trim(strBottomTitle) <> "" Then
        frmGraph.Graph1.BottomTitle = strBottomTitle
    End If
    '
End Sub
Finally, it's time to modify the ShowGraph method to incorporate the new methods into your graph display. Listing 11.27 shows the updated ShowGraph method.
Type.gifListing 11.27. The updated ShowGraph method uses the new properties.
Public Sub ShowGraph()
    '
    ' display graph
    '
    On Error GoTo LocalErr
    '
    Screen.MousePointer = vbHourglass
    OpenDB
    InitGraph
    LoadGraphData
    '
    ' added property handling
    AddLegends
    AddLabels
    AddTitles
    '
    Screen.MousePointer = vbNormal
    '
    frmGraph.Graph1.DrawMode = gphDraw
    frmGraph.Show vbModal
    '
    Exit Sub
    '
LocalErr:
    Err.Raise vbObjectError + 4, App.EXEName, "Error displaying graph"
    '
End Sub

 
< previous page page_440 next page >

If you like this book, buy it!